package com.lagou.rpc.api.impl;

import java.util.List;
import java.util.Random;

/**
 * @param
 * @author oyz
 * @version 1.0
 * @description: TODO 随机负载策略
 * @date 2022/3/1 11:40
 */
public class RandomLoadBalance extends AbstractLoadBalance {



    @Override
    protected String doSelect(List<String> address) {

        Random random = new Random();
        return address.get(random.nextInt(address.size()));
    }
}
